package com.stone.serverless.registry;

import com.stone.serverless.registry.domain.ServiceInstance;

import java.util.List;
import java.util.Map;

/**
 * @Description: TODO
 * @Author: MECHREVO
 * @Date: 2022/1/24 18:16
 * @Version: 1.0.0
 */
public interface DiscoveryService {

    List<ServiceInstance> getAllService(String serviceName);

    void registerInstance(String serviceName, String ip, int port);

    void registerInstance(String serviceName, ServiceInstance serviceInstance);

    void registerInstance(String serviceName, String version,String ip, int port, Map<String, String> metadata);

    List<ServiceInstance> selectInstances(String serviceId, boolean healthy);
    void deregisterInstance(String serviceName, String ip, int port);

}
